using System;
using System.Diagnostics;

namespace SevenDigital.EndUserManagement.Core
{
	public class User : BaseEntity<int>, IUser
	{
		public virtual string Email { get; set; }
		public virtual string Username { get; set; }
		public virtual string Password { get; set; }

		private SecurityToken _SecurityToken;

		public virtual SecurityToken SecurityToken {
			get { return _SecurityToken; }
			protected internal set { _SecurityToken = value; }
		}

		public virtual void ResetPassword() {
			Debug.WriteLine("reset password called");
			_SecurityToken =
				new SecurityToken(SystemDateTime.Now.Invoke(),
				                  Guid.NewGuid().ToString()
					);
		}
	}
}